<?php
namespace app\framework\lib;


class Config
{
   public static $config =[];
   public static $instance =null;
   public static  function getInstance()
   {
       if (empty(self::$instance)) {
           self::$instance = new self();
       }
       return self::$instance;
   }
   public static function init($config)
   {

       self::$config = $config;
   }

   public function __get($name)
   {
       return self::$config[$name] ?? null;
   }

   public function __set($name,$value)
   {
       return self::$config[$name] = $value;
   }

}